package org.example.leetcode.core.controller;

import org.example.leetcode.common.pojo.GlobalResponse;
import org.example.leetcode.core.utils.RedisUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("/redis")
@RestController
public class RedisController {
    @Resource
    RedisUtils redisUtils;
    @GetMapping("/get")
    public GlobalResponse<String> get(){
        String value = redisUtils.getValue("MAIL::13917034124");
        return GlobalResponse.success(value);
    }
}
